package com.qq.spirit.inter;

import com.qq.spirit.TaskManager;

/**
 * 任务单元
 * 
 * @author beedoorwei
 * 
 */
public abstract class TaskUnit implements Runnable
{
	public String taskDesc;
	public int gid;
	public TaskUnit a;
	public void run()
	{
		try
		{
			doTask();
		} catch (Exception ex)
		{
			
		} finally
		{
			TaskManager.removeTask(this);
		}
	}

	public int getGid()
	{
		return gid;
	}

	public void setGid(int gid)
	{
		this.gid = gid;
	}

	public abstract void doTask();

	public String getTaskDesc()
	{
		return taskDesc;
	}

	public void setTaskDesc(String taskDesc)
	{
		this.taskDesc = taskDesc;
	}

}
